package cn.nange.eurekaclientfeign.controller;

import cn.nange.eurekaclientfeign.feign.TestFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
public class TestController {
    @Autowired
    private TestFeign testFeign;

    @RequestMapping("testRest")
    public String testRest(){
        String her = testFeign.testGet("Her");
        return her;
    }

    @RequestMapping("testRestPost")
    public String testRestPost(){
        Map map = new HashMap();
        map.put("name","Her");
        String s = testFeign.testPost(map);

        return s;
    }

}
